<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <!-- 失去焦点的时候或者回车时候才会触发 -->
        <input type="text" name="" id="" v-model.lazy="msg">
        <h1>{{msg}}</h1>
        <hr>
        <!-- 失去焦点的时候或者回车时候才会触发 -->
        <input type="number" name="" id="" v-model.number="num">
        <h1>{{typeof num}}</h1>
        <h1>{{num}}</h1>
        <hr>
        <input type="text" name="" id="" v-model.trim="trimText">
        <h1>{{trimText}}</h1>
    </div>
</body>
<script src="../js/http_cdn.bootcdn.net_ajax_libs_vue_2.6.6_vue.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {
            msg: "你说话",
            num: 123,
            trimText:'卧槽终于结束了'
        },
    })
</script>

</html>
